package com.xunwulian.cmpp.sms;

import com.xunwulian.base.util.DateStyle;
import org.apache.commons.httpclient.util.DateUtil;

import java.util.Date;

/**
 * @author lucien
 *         <p>
 *         TODO To change the template for this generated type comment go to
 *         Window - Preferences - Java - Code Style - Code Templates
 */
public abstract class PDU extends ByteData {

    public int timeStamp = Integer.parseInt(DateUtil.formatDate(new Date(), DateStyle.MMDDHHMMSS.getValue()));

    @Override
    public abstract ByteBuffer getData();

    //    public abstract void assignSequenceNumber();

    public abstract boolean isRequest();

    public abstract boolean isResponse();

    @Override
    public abstract boolean equals(Object object);

    public abstract int getSequenceNumber();

    public abstract String name();

    public abstract String dump();

    public int getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(int timeStamp) {
        this.timeStamp = timeStamp;
    }
}
